package cn.laixueit.source.po;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author duxiang
 * @date 2024/2/26 15:55
 */
@Data
@Builder
@TableName("tb_datadictionart")
@NoArgsConstructor
@AllArgsConstructor
public class TbDataDict implements Serializable {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String code;
    @TableField(condition = SqlCondition.LIKE)
    private String name;
    private String createUser;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:SS")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:SS")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:SS")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:SS")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableField(exist = false)
    private List<TbDataDictDetail> dataDictDetails;
}
